package com.example.demo.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import javax.servlet.http.HttpServletRequest;

@RestController
public class HelloWorldController {
    @ApiOperation(value = "hello", notes = "notes ")
    @RequestMapping("/hello")
    public String hello(HttpServletRequest request,int id,String name ) throws Exception {

        System.out.println(id);
        System.out.println(name);

        return "HelloWorld ,Spring Boot!";
    }
    //使用该注解忽略这个API
    //@ApiIgnore
    @RequestMapping(value = "/ignoreApi")
    public String  ignoreApi() {
        return "HelloWorld ,Spring Boot!";
    }


    @RequestMapping(value = "/ignoreApi2")
    public String  ignoreApi2() {
        return "HelloWorld ,Spring Boot!";
    }




}
